<template>
  <a-modal
      v-model:open="open"
      :footer="null"
      :title="title"
  >
    <slot></slot>
  </a-modal>
</template>
<script setup>
import {ref} from "vue";

defineProps({
  title: {
    type: String,
    default: "提示",
  },
});

let open = ref(false);
const ToggleModal = (callback) => {
  callback && callback();
  open.value = !open.value;
};

defineExpose({
  ToggleModal,
});
</script>